# #求1-100的和
# thesum  = 0
# for i in range(1,101):
#     thesum+=i
# print(thesum)
#
# #2.求300-400的和
# thesum = 0
# for i in range(300,401):
#     thesum+=i
# print(thesum)



#使用函数的问题解决刚才的问题

#定义一个求和函数
# def calcSum(beg,end):
#     theSum=0
#     for i in range(beg,end+1):
#         theSum+=i
#     print(theSum)
# #调用函数
# #1-100的和
# calcSum(1,100)
# #300-400
# calcSum(300,400)
# #1-1000的和
# calcSum(1,1000)




# def test(x,y):
#     print('hello')
#     print('hello')
#     print('hello')
#     return x+y
# print(test('hello ','world'))


